<?php
/**
 * Created by PhpStorm.
 * User: lelouchms
 * Date: 2019/3/28
 * Time: 16:25
 */

namespace app\backend\validate\common;


use think\Validate;

class LoginValidate extends Validate
{

    protected $rule = [
        "username" => "require|min:5|max:30|alphaNum",
        "password" => "require|min:5|max:30",
    ];

    protected $message = [
        "username.require" => "请输入用户名",
        "username.min" => "用户名长度应在5-30个字符之间",
        "username.max" => "用户名长度应在5-30个字符之间",
        "username.alphaNum" => "用户名应为有效的字母或数字",
        "password.require" => "请输入密码",
        "password.min" => "密码长度应在5-30个字符之间",
        "password.max" => "密码长度应在5-30个字符之间",
    ];

}